package com.shop.domain.user;

import com.alibaba.fastjson.annotation.JSONField;

import com.shop.jpa.domain.BaseDomain;
import com.shop.jpa.support.JpaConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>实体类</p>
 * <p>Table: t_feedback - 意见反馈表</p>
 * @author generator
 * @date 2020-11-20 09:04:40
 */
@ApiModel("t_product_feedback 商品意向反馈表")
@Data
@Entity
@Table(name="t_product_feedback")
@SQLDelete(sql = "update t_product_feedback set is_deleted = 1 where id = ?")
@Where(clause = JpaConst.WHERE_CLAUSE_NOT_DELETED)
@DynamicInsert(true)
@DynamicUpdate(true)
public class ProductFeedback extends BaseDomain implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "id", hidden = true)
    @Column(name = "id")
    @JSONField(serialize=false)
    private Long id;


    @ApiModelProperty("反馈用户ID")
    @Column(name = "user_id")
    private Long userId;

    @ApiModelProperty("商品名称")
    @Column(name = "name")
    private String name;

    @ApiModelProperty("商品内容描述")
    @Column(name = "content")
    private String content;

    @ApiModelProperty("商品价格")
    @Column(name = "privce")
    private String privce;


    @ApiModelProperty("商品图片")
    @Column(name = "img")
    private String img;

    @ApiModelProperty("是否处理")
    @Column(name = "is_handle")
    private Integer isHandle;

    @ApiModelProperty("反馈处理内容")
    @Column(name = "handle_res")
    private String handleRes;

    @ApiModelProperty("反馈处理时间")
    @Column(name = "handle_time")
    private Date handleTime;

    @ApiModelProperty("反馈处理图片")
    @Column(name = "handle_img")
    private String handleImg;


    /**
	 * 创建时间
	 */
	@Column(name = "create_time")
    @ApiModelProperty("创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    /**
	 * 最后一次更新时间
	 */
	@Column(name = "update_time")
    @ApiModelProperty("最后一次更新时间")
    @JSONField(serialize=false)
    private Date updateTime;

    /**
	 * 是否删除 0：不删除   1：删除
	 */
	@Column(name = "is_deleted")
    @ApiModelProperty("是否删除 0：不删除   1：删除")
    @JSONField(serialize=false)
    private Integer isDeleted;




}